{% load static %}
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" href="{% static 'bootstrap/css/bootstrap.min.css' %}">
</head>
<body>
{% block header %}
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
  <div class="container">
    <!-- 导航栏商标 -->
    <a class="navbar-brand" href="#">农户档案</a>
    <!-- 导航入口 -->
    <div>
      <ul class="navbar-nav">
        <!-- 条目 -->
      {% if user.is_authenticated %}
          <li class="nav-item">
              <a class="nav-link" href="#">{{ user.username }}</a>
          </li>
          <li class="nav-item">
              <a class="nav-link" href="{% url 'logout' %}">退出</a>
          </li>
{#      {% else %}#}
{#        <li class="nav-item">#}
{#            <a class="nav-link" href="{% url 'login' %}">登录</a>#}
{#        </li>#}
      {% endif %}
      </ul>
    </div>
  </div>
</nav>
{% endblock %}
<br>

{% block content %} 正文 {% endblock %}

{% block footer %}
<footer class="py-3 bg-dark fixed-bottom">
    <div class="container">
        <p class="m-0 text-center text-white">Copyright &copy; 重庆工程学院 20大数据应用开发3班 XXX
            <a class="text-white" href="/admin/">管理后台</a>
        </p>
    </div>
</footer>
{% endblock %}

</body>
</html>